package net.dnw.practicesummary.home;

import android.os.Bundle;
import android.widget.TextView;

import net.dnw.practicesummary.R;
import net.dnw.practicesummary.home.contract.MainContract;
import net.dnw.practicesummary.home.model.MainModelImpl;
import net.dnw.practicesummary.home.presenter.MainPresenterImpl;
import net.dnw.practicesummary.mvp.base.BaseMvpActivity;

import butterknife.BindView;


/**
 * Created by Administrator on 2019/2/22 0022.
 */

public class MainMvpActivity extends BaseMvpActivity<MainContract.MainModel,MainContract.MainView,MainPresenterImpl> implements MainContract.MainView{

    @BindView(R.id.test_requst)
    public TextView textView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        presenter.getData();
    }

    @Override
    public MainModelImpl createModel() {
        return new MainModelImpl();
    }

    @Override
    public MainContract.MainView createView() {
        return this;
    }

    @Override
    public MainPresenterImpl createPresenter() {
        return new MainPresenterImpl();
    }


    @Override
    protected int getLayout() {
        return R.layout.main_mvp_layout;
    }

    @Override
    public void setTestTip(String data) {
        textView.setText(data);
    }

}
